﻿using Uniforax.Core.Common;
using Uniforax.Core.Interfaces;

namespace Uniforax.Core.GameActions
{

    public class BaseGameAction
    {
        ///<summary>是否因为什么原因被取消了。</summary>
        public bool IsCancenlled { get; set; }

        public string Name { get; set; }

        ///<summary>执行。</summary>
        public virtual void Execute(ActionContext context)
        {
            
        }

        public virtual void Undo(ActionContext context)
        {

        }

        ///<summary>行为执行宿主。</summary>
        public void ExecuteHost(IExecutableHost executableHost)
        {
            executableHost.Execute(this);
        }

    }
}